import request from '@/utils/request'

// 查询调休申请列表
export function listTimeoff(query) {
  return request({
    url: '/timeoff/timeoff/list',
    method: 'get',
    params: query
  })
}

// 查询调休申请详细
export function getTimeoff(id) {
  return request({
    url: '/timeoff/timeoff/' + id,
    method: 'get'
  })
}

// 新增调休申请
export function addTimeoff(data) {
  return request({
    url: '/timeoff/timeoff',
    method: 'post',
    data: data
  })
}

// 修改调休申请
export function updateTimeoff(data) {
  return request({
    url: '/timeoff/timeoff',
    method: 'put',
    data: data
  })
}

// 删除调休申请
export function delTimeoff(id) {
  return request({
    url: '/timeoff/timeoff/' + id,
    method: 'delete'
  })
}
